package dovs.instructions;

/**
 * An <code>if</code> instruction comparing a value to zero or null. Depending
 * on the condition parameter of the instruction, this instruction corresponds
 * to the actual JVM instruction <code>ifeq</code>, <code>ifne</code>,
 * <code>iflt</code>, <code>ifle</code>, <code>ifgt</code>,
 * <code>ifge</code>, <code>ifnull</code> or <code>ifnonnull</code>.
 */
public class Iif extends ConditionalJump {
	public Iif(Condition cond, Label target) {
		super(cond, target);
	}

	public @Override
	String toAsm() {
		return Condition.ifName(cond) + " " + target;
	}

	public @Override
	int stackChange() {
		return -1;
	}
}
